﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Comment_manager.ascx.cs"
    Inherits="admin_module_Comment_manager" %>
<link href="../css/styles.css" rel="stylesheet" type="text/css" />
<div id="tables">
    <asp:DataList ID="DataList1" runat="server" DataKeyField="comment_id" Width="100%"
        OnEditCommand="DataList1_EditCommand" OnItemDataBound="DataList1_ItemDataBound"
        OnUpdateCommand="DataList1_UpdateCommand">
        <EditItemTemplate>
            <tr>
                <td align="center" height="40" class="bodytext_table">
                   <asp:Label ID="lblEmail" runat="server" Text=' <%# Eval("email") %>'></asp:Label>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("article_name")%><asp:Label ID="lblArticle_id" runat="server" Text=' <%# Eval("article_id")%>' Visible=false ></asp:Label>
                </td>
                <td align="center" class="bodytext_table" height="40">
                     <asp:TextBox ID="txtComment_name" runat="server" Text='<%# Bind("comment_name")%>'></asp:TextBox>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <asp:TextBox ID="txtComment_des" runat="server" Text='<%# Bind("comment_des")%>'
                        Height="69px" TextMode="MultiLine"></asp:TextBox>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("status")%>
                </td>
                <td align="center" height="40" class="bodytext_table" style="width:100px">
                   <%# Eval("date_added")%>
                </td>
                <td height="40" class="bodytext_table" vertical-align="center">
                    <asp:ImageButton ID="imgSave" runat="server" ImageUrl="~/admin/images/icons/save_icon.gif"
                        ToolTip="Save" CommandName="Update" />
                    <asp:ImageButton ID="imgCancel" runat="server" ImageUrl="~/admin/images/icons/cancel_icon.png" ToolTip="Cancel" OnClick="imgCancel_Click" />
                    <asp:DropDownList ID="ddlStatus" runat="server">
                        <asp:ListItem Value="">  </asp:ListItem>
                        <asp:ListItem Value="true">Bật</asp:ListItem>
                        <asp:ListItem Value="false">Tắt</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
        </EditItemTemplate>
        <HeaderTemplate>
            <table width="1000" cellspacing="0">
                <tr>
                    <th width="100" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Email</div>
                    </th>
                    <th width="180" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Comment thuộc bài viết</div>
                    </th>
                    <th width="150" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Tiêu đề Comment</div>
                    </th>
                    <th width="100" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Nội Dung</div>
                    </th>
                    <th width="100" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Trạng thái</div>
                    </th>
                    <th width="100" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Ngày tạo</div>
                    </th>
                    <th width="150" height="40" class="title_table" scope="col">
                        <div align="center" class="tabletitles">
                            Hành động</div>
                    </th>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("email")%>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("article_name")%>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("comment_name")%>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("comment_des")%>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("status")%>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <%# Eval("date_added")%>
                </td>
                <td align="center" height="40" class="bodytext_table">
                    <asp:ImageButton ID="imgEdit" ImageUrl="~/admin/images/icons/edit.png" CommandName="edit"
                        runat="server" />&nbsp;
                    <asp:ImageButton ID="imgDelete" ImageUrl="~/admin/images/icons/remove.png" CommandName="delete"
                        runat="server" />
                </td>
            </tr>
        </ItemTemplate>
    </asp:DataList>
    </table>
</div>
